﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AnesSystem.ViewModels
{
    public class AnesRecordItemCtrlViewModel : MultitonBaseViewModel
    {
        #region Variables
        protected AnesRecordBaseInfoCtrlViewModel _anesRecordBaseInfoCtrlViewModel;
        protected RealTimeSignShowCtrlViewModel _realTimeSignShowCtrlViewModel;
        protected RealTimeItemCtrlViewModel _realTimeItemCtrlViewModel;
        protected AnesRecordTimeCtrlViewModel _anesRecordTimeCtrlViewModel;
        protected AnesMedicineCtrlViewModel _anesMedicineCtrlViewModel;
        protected AnesInfusionCtrlViewModel _anesInfusionCtrlViewModel;
        protected AnesEventAndMedicineCtrlViewModel _anesEventAndMedicineCtrlViewModel;
        protected OperStatusItemCtrlViewModel _operStatusItemCtrlViewModel;
        #endregion


        #region Constructor
        public AnesRecordItemCtrlViewModel(int curPage)
        {
            CurPage = curPage;
            InitData();
        }

        #endregion


        #region Properties
        public RealTimeSignShowCtrlViewModel RealTimeSignShowCtrlViewModel
        {
            get
            {
                return _realTimeSignShowCtrlViewModel;
            }

            set
            {
                _realTimeSignShowCtrlViewModel = value;
            }
        }

        public RealTimeItemCtrlViewModel RealTimeItemCtrlViewModel
        {
            get
            {
                return _realTimeItemCtrlViewModel;
            }

            set
            {
                _realTimeItemCtrlViewModel = value;
            }
        }

        public AnesRecordTimeCtrlViewModel AnesRecordTimeCtrlViewModel
        {
            get
            {
                return _anesRecordTimeCtrlViewModel;
            }

            set
            {
                _anesRecordTimeCtrlViewModel = value;
            }
        }

        public AnesMedicineCtrlViewModel AnesMedicineCtrlViewModel
        {
            get
            {
                return _anesMedicineCtrlViewModel;
            }

            set
            {
                _anesMedicineCtrlViewModel = value;
            }
        }

        public AnesEventAndMedicineCtrlViewModel AnesEventAndMedicineCtrlViewModel
        {
            get
            {
                return _anesEventAndMedicineCtrlViewModel;
            }

            set
            {
                _anesEventAndMedicineCtrlViewModel = value;
            }
        }

        public AnesInfusionCtrlViewModel AnesInfusionCtrlViewModel
        {
            get
            {
                return _anesInfusionCtrlViewModel;
            }

            set
            {
                _anesInfusionCtrlViewModel = value;
            }
        }

        public OperStatusItemCtrlViewModel OperStatusItemCtrlViewModel
        {
            get
            {
                return _operStatusItemCtrlViewModel;
            }

            set
            {
                _operStatusItemCtrlViewModel = value;
            }
        }

        public AnesRecordBaseInfoCtrlViewModel AnesRecordBaseInfoCtrlViewModel
        {
            get
            {
                return _anesRecordBaseInfoCtrlViewModel;
            }

            set
            {
                _anesRecordBaseInfoCtrlViewModel = value;
            }
        }

        #endregion


        #region 依赖属性


        #endregion


        #region Event


        #endregion


        #region protected Methods
        /// <summary>
        /// 创建多页麻醉单ViewModel模块(不能使用单例)
        /// </summary>
        protected virtual void CreataViewModels()
        {
            _anesRecordBaseInfoCtrlViewModel = new AnesRecordBaseInfoCtrlViewModel(CurPage);
            _realTimeSignShowCtrlViewModel = new RealTimeSignShowCtrlViewModel(CurPage);
            _realTimeItemCtrlViewModel = new RealTimeItemCtrlViewModel(CurPage);
            _anesRecordTimeCtrlViewModel = new AnesRecordTimeCtrlViewModel(CurPage);
            _anesMedicineCtrlViewModel = new AnesMedicineCtrlViewModel(CurPage);
            _anesInfusionCtrlViewModel = new AnesInfusionCtrlViewModel(CurPage);
            _anesEventAndMedicineCtrlViewModel = new AnesEventAndMedicineCtrlViewModel(CurPage);
            _operStatusItemCtrlViewModel = new OperStatusItemCtrlViewModel(CurPage);

        }

        #endregion

        //多页面非单例控件刷新需指定页数
        #region Public/ProtectedMethods
        public override void Refresh()
        {
            _anesRecordTimeCtrlViewModel.Refresh();
            _realTimeSignShowCtrlViewModel.Refresh();
            _realTimeItemCtrlViewModel.Refresh();
            _anesEventAndMedicineCtrlViewModel.Refresh();
            _anesMedicineCtrlViewModel.Refresh();
            _anesInfusionCtrlViewModel.Refresh();
            _operStatusItemCtrlViewModel.Refresh();

        }
        public override void InitData()
        {
            CreataViewModels();
        }

        #endregion


        #region EventHandlers


        #endregion
    }
}
